
<div id="content">
    <section id="widget-grid4" widget-grid>
        <div class="row">
            <div style="margin: 0px 20px">
                    <header role="header" class="ui-sortable-handle head-top">
                       <span class="head-z" style="line-height: 30px; color:#333;margin-left: 20px;"><i class="glyphicon glyphicon-user"></i>修改密码</span>
                       <span class="head-z pull-right">带*为必填项</span>
                    </header>
                <div class="well">  
                    <form  class="form-horizontal" role="form" name="infoForm" novalidate 
                    enctype="multipart/form-data">
                      <div class="form-group">
                        <label  class="col-sm-2 control-label"><sup>*</sup>请输入旧密码</label>
                        <div class="col-sm-3">
                            <input type='password' id="oldpassword" class="form-control" name="data.oldpassword" placeholder="请输入旧密码"/ ng-model = "data.oldpasswd">
                        </div>
                        <div class="col-sm-7" style="display: inline" id="tip1"></div>  
                      </div>
                      <div class="form-group">
                        <label  class="col-sm-2 control-label"><sup>*</sup>请输入新密码</label>
                        <div class="col-sm-3">
                            <input type='password' id="password1" class="form-control"  name="password1" placeholder="密码长度6-18"/ ng-model = "data.newpasswd1" > 
                        </div>
                        <div class="col-sm-7" style="display: inline" id="tip2"></div>
                      </div>
                      <div class="form-group">
                        <label  class="col-sm-2 control-label"><sup>*</sup>请再次输入新密码</label>
                        <div class="col-sm-3">
                            <input type='password' id="password2" class="form-control" name="password2" placeholder="再次输入新密码"/ ng-model= "data.newpasswd2">
                        </div>
                        <div class="col-sm-7" style="display: inline" id="tip3"></div>
                      </div>
                      <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-8">
                          <button type="submit" id="btn" class="btn btn-default btn-primary"  ng-click="modifyinfo()">修改个人资料</button>
                          <div style="display: inline" id="tip4"></div>
                        </div>
                      </div>                     
                    </form>  
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    $("oldpassword").blur(function(){
        var num=$("#password1").val().length;  
            if(num<6){  
                $("#tip1").html("<font color=\"red\" size=\"2\"> 密码格式不正确</font>");                  
            }  
            else if(num>18){  
                $("#tip1").html("<font color=\"red\" size=\"2\">  密码格式不正确</font>");                   
            }  
            else{  
                $("#tip1").html("<font color=\"green\" size=\"2\">密码格式正确</font>");                  
            }
    })
    $("#password1").blur(function(){
            var num=$("#password1").val().length;  
            if(num<6){  
                $("#tip2").html("<font color=\"red\" size=\"2\"> 密码格式不正确</font>");                  
            }  
            else if(num>18){  
                $("#tip2").html("<font color=\"red\" size=\"2\">  密码格式不正确</font>");                   
            }  
            else{  
                $("#tip2").html("<font color=\"green\" size=\"2\">密码格式正确</font>");                  
            }  
    });
    $("#password2").blur(function(){  
        var tmp=$("#password1").val();  
        var num=$("#password2").val().length;  
        if($("#password2").val()!=tmp){  
            $("#tip3").html("<font color=\"red\" size=\"2\">两次密码不一样</font>");                   
        }  
        else{  
            if(num>=6&&num<=18){  
                $("#tip3").html("<font color=\"green\" size=\"2\">密码格式正确</font>");                      
            }                   
            else{  
                $("#tip3").html("<font color=\"red\" size=\"2\"> 密码格式不正确</font>");                             
            }                  
        }  
    });
</script>